package com.cysoft.starter.log.core.properties;

import com.cysoft.starter.log.core.enums.OutputEnum;
import com.cysoft.starter.log.core.properties.output.ElasticSearchProperties;
import com.cysoft.starter.log.core.properties.output.JdbcProperties;
import com.cysoft.starter.log.core.properties.output.KafkaProperties;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

/**
 * @author 玖零
 * @version v0.0.1
 * @project cysoft-spring-boot-starter-log
 * @package com.cysoft.starter.log.core.properties
 * @date 2025-02-03 23:48
 * @desc 日志输出配置
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LogOutputProperties {

    /**
     * 输出类型,默认输出到控制台,可选:elasticsearch、kafka、jdbc、event
     */
    private OutputEnum outputType = OutputEnum.DEFAULT;

    /**
     * elasticsearch / opensearch 嵌套属性配置 使用bboss
     */
    @NestedConfigurationProperty
    private ElasticSearchProperties elasticsearch = new ElasticSearchProperties();

    /**
     * kafka嵌套属性配置
     */
    @NestedConfigurationProperty
    private KafkaProperties kafka = new KafkaProperties();

    /**
     * jdbc嵌套属性配置
     */
    @NestedConfigurationProperty
    private JdbcProperties jdbc = new JdbcProperties();

}
